package com.foryouco.cody;

import java.util.regex.*;

public class Syntax 
{
	public static final String CODY_TAG_START = "<cody[^>]*language=\\\"[^>]*\\\"[^>]*>";
	public static final String CODY_TAG_END = "</cody>";
        static String[] detectSyntax(String textToSearch, int index)
        {
        	Pattern startP = Pattern.compile(CODY_TAG_START);
        	Matcher startM = startP.matcher(textToSearch.toLowerCase());
        	Pattern langP = Pattern.compile("(?<=language=\\\")[^>\\\" ]*");
        	Matcher langM = langP.matcher(textToSearch.toLowerCase());
        	Pattern endP = Pattern.compile(CODY_TAG_END);
        	Matcher endM = endP.matcher(textToSearch.toLowerCase());
        	if(startM.find(index))
        	{
        		langM.find(startM.start());
        		if(endM.find(startM.end()))
        		{
        			return new String[] {langM.group(), String.valueOf(startM.end()), String.valueOf(endM.start())};
        		}
        		else
        		{
        			return new String[] {langM.group(), String.valueOf(startM.end()), String.valueOf(textToSearch.length())};
        		}
        	}
        	return new String[] {"-1"};
        }
        static String[][] php = 
        {{"<\\?php", "START"}, 
        {"\\?>", "END"},
        {"array", "KEYWORD"},
        {"break", "KEYWORD"},
        {"class", "KEYWORD"},
        {"const", "KEYWORD"},
        {"else", "KEYWORD"},
        {"false", "KEYWORD"},
        {"for", "KEYWORD"},
        {"function", "KEYWORD"},
        {"if", "KEYWORD"},
        {"include", "KEYWORD"},
        {"public", "KEYWORD"},
        {"require", "KEYWORD"},
        {"return", "KEYWORD"},
        {"static", "KEYWORD"},
        {"switch", "KEYWORD"},
        {"true", "KEYWORD"},
        {"while", "KEYWORD"},
        {"addslashes", "METHOD"},
        {"addcslashes", "METHOD"},
        {"bin2hex", "METHOD"},
        {"chop", "METHOD"},
        {"chr", "METHOD"},
        {"chunk_ split", "METHOD"},
        {"convert_ cyr_ string", "METHOD"},
        {"convert_ uudecode", "METHOD"},
        {"convert_ uuencode", "METHOD"},
        {"count_ chars", "METHOD"},
        {"crc32", "METHOD"},
        {"crypt", "METHOD"},
        {"echo", "METHOD"},
        {"explode", "METHOD"},
        {"file_exists", "METHOD"},
        {"file_put_contents", "METHOD"},
        {"fprintf", "METHOD"},
        {"get_ html_ translation_ table", "METHOD"},
        {"header", "METHOD"},
        {"hebrev", "METHOD"},
        {"hebrevc", "METHOD"},
        {"html_ entity_ decode", "METHOD"},
        {"htmlentities", "METHOD"},
        {"htmlspecialchars_ decode", "METHOD"},
        {"htmlspecialchars", "METHOD"},
        {"implode", "METHOD"},
        {"isset", "METHOD"},
        {"join", "METHOD"},
        {"lcfirst", "METHOD"},
        {"levenshtein", "METHOD"},
        {"localeconv", "METHOD"},
        {"ltrim", "METHOD"},
        {"md5_ file", "METHOD"},
        {"md5", "METHOD"},
        {"metaphone", "METHOD"},
        {"money_ format", "METHOD"},
        {"mysql_affected_rows", "METHOD"},
        {"mysql_change_user", "METHOD"},
        {"mysql_client_encoding", "METHOD"},
        {"mysql_close", "METHOD"},
        {"mysql_connect", "METHOD"},
        {"mysql_create_db", "METHOD"},
        {"mysql_data_seek", "METHOD"},
        {"mysql_db_name", "METHOD"},
        {"mysql_db_query", "METHOD"},
        {"mysql_drop_db", "METHOD"},
        {"mysql_errno", "METHOD"},
        {"mysql_error", "METHOD"},
        {"mysql_escape_string", "METHOD"},
        {"mysql_fetch_array", "METHOD"},
        {"mysql_fetch_assoc", "METHOD"},
        {"mysql_fetch_field", "METHOD"},
        {"mysql_fetch_lengths", "METHOD"},
        {"mysql_fetch_object", "METHOD"},
        {"mysql_fetch_row", "METHOD"},
        {"mysql_field_flags", "METHOD"},
        {"mysql_field_len", "METHOD"},
        {"mysql_field_name", "METHOD"},
        {"mysql_field_seek", "METHOD"},
        {"mysql_field_table", "METHOD"},
        {"mysql_field_type", "METHOD"},
        {"mysql_free_result", "METHOD"},
        {"mysql_get_client_info", "METHOD"},
        {"mysql_get_host_info", "METHOD"},
        {"mysql_get_proto_info", "METHOD"},
        {"mysql_get_server_info", "METHOD"},
        {"mysql_info", "METHOD"},
        {"mysql_insert_id", "METHOD"},
        {"mysql_list_dbs", "METHOD"},
        {"mysql_list_fields", "METHOD"},
        {"mysql_list_processes", "METHOD"},
        {"mysql_list_tables", "METHOD"},
        {"mysql_num_fields", "METHOD"},
        {"mysql_num_rows", "METHOD"},
        {"mysql_pconnect", "METHOD"},
        {"mysql_ping", "METHOD"},
        {"mysql_query", "METHOD"},
        {"mysql_real_escape_string", "METHOD"},
        {"mysql_result", "METHOD"},
        {"mysql_select_db", "METHOD"},
        {"mysql_set_charset", "METHOD"},
        {"mysql_stat", "METHOD"},
        {"mysql_tablename", "METHOD"},
        {"mysql_thread_id", "METHOD"},
        {"mysql_unbuffered_query", "METHOD"},
        {"nl_ langinfo", "METHOD"},
        {"nl2br", "METHOD"},
        {"number_ format", "METHOD"},
        {"ob_end_flush", "METHOD"},
        {"ob_start", "METHOD"},
        {"ord", "METHOD"},
        {"parse_ str", "METHOD"},
        {"print", "METHOD"},
        {"printf", "METHOD"},
        {"quoted_ printable_ decode", "METHOD"},
        {"quoted_ printable_ encode", "METHOD"},
        {"quotemeta", "METHOD"},
        {"rtrim", "METHOD"},
        {"setcookie", "METHOD"},
        {"setlocale", "METHOD"},
        {"sha1_ file", "METHOD"},
        {"sha1", "METHOD"},
        {"similar_ text", "METHOD"},
        {"soundex", "METHOD"},
        {"sprintf", "METHOD"},
        {"sscanf", "METHOD"},
        {"str_ getcsv", "METHOD"},
        {"str_ ireplace", "METHOD"},
        {"str_ pad", "METHOD"},
        {"str_ repeat", "METHOD"},
        {"str_ replace", "METHOD"},
        {"str_ rot13", "METHOD"},
        {"str_ shuffle", "METHOD"},
        {"str_ split", "METHOD"},
        {"str_ word_ count", "METHOD"},
        {"strcasecmp", "METHOD"},
        {"strchr", "METHOD"},
        {"strcmp", "METHOD"},
        {"strcoll", "METHOD"},
        {"strcspn", "METHOD"},
        {"strip_ tags", "METHOD"},
        {"stripcslashes", "METHOD"},
        {"stripos", "METHOD"},
        {"stripslashes", "METHOD"},
        {"stristr", "METHOD"},
        {"strlen", "METHOD"},
        {"strnatcasecmp", "METHOD"},
        {"strnatcmp", "METHOD"},
        {"strncasecmp", "METHOD"},
        {"strncmp", "METHOD"},
        {"strpbrk", "METHOD"},
        {"strpos", "METHOD"},
        {"strrchr", "METHOD"},
        {"strrev", "METHOD"},
        {"strripos", "METHOD"},
        {"strrpos", "METHOD"},
        {"strspn", "METHOD"},
        {"strstr", "METHOD"},
        {"strtok", "METHOD"},
        {"strtolower", "METHOD"},
        {"strtoupper", "METHOD"},
        {"strtr", "METHOD"},
        {"substr_ compare", "METHOD"},
        {"substr_ count", "METHOD"},
        {"substr_ replace", "METHOD"},
        {"substr", "METHOD"},
        {"time", "METHOD"},
        {"trim", "METHOD"},
        {"ucfirst", "METHOD"},
        {"ucwords", "METHOD"},
        {"vfprintf", "METHOD"},
        {"vprintf", "METHOD"},
        {"vsprintf", "METHOD"},
        {"wordwrap", "METHOD"},
        {"\\$[a-zA-Z_][a-zA-Z_\\-\\$]*", "VARIABLE"},
        {"(?<!\\\\)\'", "STRING"},
        {"(?<!\\\\)\"", "STRING"},
        {"//", "COMMENT"},
        {"/\\*", "COMMENT", "\\*/"}};
        static String[][] html = 
        {{"<[^<>]*>", "ATTR"},
        {"<[^<>\\s]*", "TAG"},
        {"(</?|/? ?>)", "ELEMENT"},
        {"(?<=[A-Za-z0-9]=)[^<>\"\\s]*(?=[^<>]*>)", "ATTRVALUE"},
        {"(?<!\\\\)\'", "STRING"},
        {"(?<!\\\\)\"", "STRING"},
        {"<!--", "COMMENT", "-->"}};
		static String[][] cplusplus = 
		{		{"__abstract", "KEYWORD"},
		{"abstract", "KEYWORD"},
		{"__alignof Operator", "KEYWORD"},
		{"array", "KEYWORD"},
		{"__asm", "KEYWORD"},
		{"__assume", "KEYWORD"},
		{"__based", "KEYWORD"},
		{"bool", "KEYWORD"},
		{"__box", "KEYWORD"},
		{"break", "KEYWORD"},
		{"case", "KEYWORD"},
		{"catch", "KEYWORD"},
		{"__cdecl", "KEYWORD"},
		{"char", "KEYWORD"},
		{"class", "KEYWORD"},
		{"const", "KEYWORD"},
		{"const_cast", "KEYWORD"},
		{"continue", "KEYWORD"},
		{"__declspec", "KEYWORD"},
		{"default", "KEYWORD"},
		{"__delegate", "KEYWORD"},
		{"delegate", "KEYWORD"},
		{"delete", "KEYWORD"},
		{"deprecated", "KEYWORD"},
		{"dllexport", "KEYWORD"},
		{"dllimport", "KEYWORD"},
		{"do", "KEYWORD"},
		{"double", "KEYWORD"},
		{"dynamic_cast", "KEYWORD"},
		{"else", "KEYWORD"},
		{"enum", "KEYWORD"},
		{"enum class", "KEYWORD"},
		{"enum struct", "KEYWORD"},
		{"event", "KEYWORD"},
		{"__event", "KEYWORD"},
		{"__except", "KEYWORD"},
		{"explicit", "KEYWORD"},
		{"extern", "KEYWORD"},
		{"false", "KEYWORD"},
		{"__fastcall", "KEYWORD"},
		{"__finally", "KEYWORD"},
		{"finally", "KEYWORD"},
		{"float", "KEYWORD"},
		{"for", "KEYWORD"},
		{"each", "KEYWORD"},
		{"in", "KEYWORD"},
		{"__forceinline", "KEYWORD"},
		{"friend", "KEYWORD"},
		{"friend_as", "KEYWORD"},
		{"__gc", "KEYWORD"},
		{"gcnew", "KEYWORD"},
		{"generic", "KEYWORD"},
		{"goto", "KEYWORD"},
		{"__hook", "KEYWORD"},
		{"__identifier", "KEYWORD"},
		{"if", "KEYWORD"},
		{"__if_exists", "KEYWORD"},
		{"__if_not_exists", "KEYWORD"},
		{"initonly", "KEYWORD"},
		{"__inline", "KEYWORD"},
		{"inline", "KEYWORD"},
		{"int", "KEYWORD"},
		{"__int8", "KEYWORD"},
		{"__int16", "KEYWORD"},
		{"__int32", "KEYWORD"},
		{"__int64", "KEYWORD"},
		{"__interface", "KEYWORD"},
		{"__interface class", "KEYWORD"},
		{"__interface struct", "KEYWORD"},
		{"interior_ptr", "KEYWORD"},
		{"__leave", "KEYWORD"},
		{"literal", "KEYWORD"},
		{"long", "KEYWORD"},
		{"__m64", "KEYWORD"},
		{"__m128", "KEYWORD"},
		{"__m128d", "KEYWORD"},
		{"__m128i", "KEYWORD"},
		{"__multiple_inheritance", "KEYWORD"},
		{"mutable", "KEYWORD"},
		{"naked", "KEYWORD"},
		{"namespace", "KEYWORD"},
		{"new", "KEYWORD"},
		{"__nogc", "KEYWORD"},
		{"noinline", "KEYWORD"},
		{"__noop", "KEYWORD"},
		{"noreturn", "KEYWORD"},
		{"nothrow", "KEYWORD"},
		{"novtable", "KEYWORD"},
		{"nullptr", "KEYWORD"},
		{"operator", "KEYWORD"},
		{"__pin", "KEYWORD"},
		{"private", "KEYWORD"},
		{"__property", "KEYWORD"},
		{"property", "KEYWORD"},
		{"protected", "KEYWORD"},
		{"public", "KEYWORD"},
		{"__raise", "KEYWORD"},
		{"ref struct", "KEYWORD"},
		{"ref class", "KEYWORD"},
		{"register", "KEYWORD"},
		{"reinterpret_cast", "KEYWORD"},
		{"return", "KEYWORD"},
		{"safecast", "KEYWORD"},
		{"__sealed", "KEYWORD"},
		{"sealed", "KEYWORD"},
		{"selectany", "KEYWORD"},
		{"short", "KEYWORD"},
		{"signed", "KEYWORD"},
		{"__single_inheritance", "KEYWORD"},
		{"sizeof", "KEYWORD"},
		{"static", "KEYWORD"},
		{"static_cast", "KEYWORD"},
		{"__stdcall", "KEYWORD"},
		{"struct", "KEYWORD"},
		{"__super", "KEYWORD"},
		{"switch", "KEYWORD"},
		{"template", "KEYWORD"},
		{"this", "KEYWORD"},
		{"thread", "KEYWORD"},
		{"throw", "KEYWORD"},
		{"true", "KEYWORD"},
		{"try", "KEYWORD"},
		{"__try", "KEYWORD"},
		{"__finally", "KEYWORD"},
		{"__try_cast", "KEYWORD"},
		{"typedef", "KEYWORD"},
		{"typeid", "KEYWORD"},
		{"typename", "KEYWORD"},
		{"__unaligned", "KEYWORD"},
		{"__unhook", "KEYWORD"},
		{"union", "KEYWORD"},
		{"unsigned", "KEYWORD"},
		{"using", "KEYWORD"},
		{"uuid", "KEYWORD"},
		{"__uuidof", "KEYWORD"},
		{"value struct", "KEYWORD"},
		{"value class", "KEYWORD"},
		{"__value", "KEYWORD"},
		{"virtual", "KEYWORD"},
		{"__virtual_inheritance", "KEYWORD"},
		{"void", "KEYWORD"},
		{"volatile", "KEYWORD"},
		{"__w64", "KEYWORD"},
		{"while", "KEYWORD"},
		{"/'*", "COMMENT", "'*/"}};
		static String[][] c =
		{{"auto", "KEYWORD"},
		{"double", "KEYWORD"},
		{"int", "KEYWORD"},
		{"struct", "KEYWORD"},
		{"break", "KEYWORD"},
		{"else", "KEYWORD"},
		{"long", "KEYWORD"},
		{"switch", "KEYWORD"},
		{"case", "KEYWORD"},
		{"enum", "KEYWORD"},
		{"register", "KEYWORD"},
		{"typedef", "KEYWORD"},
		{"char", "KEYWORD"},
		{"extern", "KEYWORD"},
		{"return", "KEYWORD"},
		{"union", "KEYWORD"},
		{"const", "KEYWORD"},
		{"float", "KEYWORD"},
		{"short", "KEYWORD"},
		{"unsigned", "KEYWORD"},
		{"continue", "KEYWORD"},
		{"for", "KEYWORD"},
		{"signed", "KEYWORD"},
		{"void", "KEYWORD"},
		{"default", "KEYWORD"},
		{"goto", "KEYWORD"},
		{"sizeof", "KEYWORD"},
		{"volatile", "KEYWORD"},
		{"do", "KEYWORD"},
		{"if", "KEYWORD"},
		{"static", "KEYWORD"},
		{"while", "KEYWORD"},
		{"__asm", "KEYWORD"},
		{"dllimport", "KEYWORD"},
		{"__int8", "KEYWORD"},
		{"naked", "KEYWORD"},
		{"__based", "KEYWORD"},
		{"__except", "KEYWORD"},
		{"__int16", "KEYWORD"},
		{"__stdcall", "KEYWORD"},
		{"__cdecl", "KEYWORD"},
		{"__fastcall", "KEYWORD"},
		{"__int32", "KEYWORD"},
		{"__thread", "KEYWORD"},
		{"__declspec", "KEYWORD"},
		{"__finally", "KEYWORD"},
		{"__int64", "KEYWORD"},
		{"__try", "KEYWORD"},
		{"dllexport", "KEYWORD"},
		{"__inline", "KEYWORD"},
		{"__leave", "KEYWORD"},
		{"/'*", "COMMENT", "'*/"}};
		static String[][] vbnet =
		{{"addhandler", "KEYWORD"},
		{"addressof", "KEYWORD"},
		{"alias", "KEYWORD"},
		{"and", "KEYWORD"},
		{"andalso", "KEYWORD"},
		{"ansi", "KEYWORD"},
		{"as", "KEYWORD"},
		{"assembly", "KEYWORD"},
		{"auto", "KEYWORD"},
		{"boolean", "KEYWORD"},
		{"byref", "KEYWORD"},
		{"byte", "KEYWORD"},
		{"byval", "KEYWORD"},
		{"call", "KEYWORD"},
		{"case", "KEYWORD"},
		{"catch", "KEYWORD"},
		{"cbool", "KEYWORD"},
		{"cbyte", "KEYWORD"},
		{"cchar", "KEYWORD"},
		{"cdate", "KEYWORD"},
		{"cdec", "KEYWORD"},
		{"cdbl", "KEYWORD"},
		{"char", "KEYWORD"},
		{"cint", "KEYWORD"},
		{"class", "KEYWORD"},
		{"clng", "KEYWORD"},
		{"cobj", "KEYWORD"},
		{"const", "KEYWORD"},
		{"cshort", "KEYWORD"},
		{"csng", "KEYWORD"},
		{"cstr", "KEYWORD"},
		{"ctype", "KEYWORD"},
		{"date", "KEYWORD"},
		{"decimal", "KEYWORD"},
		{"declare", "KEYWORD"},
		{"default", "KEYWORD"},
		{"delegate", "KEYWORD"},
		{"dim", "KEYWORD"},
		{"directcast", "KEYWORD"},
		{"do", "KEYWORD"},
		{"double", "KEYWORD"},
		{"each", "KEYWORD"},
		{"else", "KEYWORD"},
		{"elseif", "KEYWORD"},
		{"end", "KEYWORD"},
		{"enum", "KEYWORD"},
		{"erase", "KEYWORD"},
		{"error", "KEYWORD"},
		{"event", "KEYWORD"},
		{"exit", "KEYWORD"},
		{"false", "KEYWORD"},
		{"finally", "KEYWORD"},
		{"for", "KEYWORD"},
		{"friend", "KEYWORD"},
		{"function", "KEYWORD"},
		{"get", "KEYWORD"},
		{"gettype", "KEYWORD"},
		{"gosub", "KEYWORD"},
		{"goto", "KEYWORD"},
		{"handles", "KEYWORD"},
		{"if", "KEYWORD"},
		{"implements", "KEYWORD"},
		{"imports", "KEYWORD"},
		{"in", "KEYWORD"},
		{"inherits", "KEYWORD"},
		{"integer", "KEYWORD"},
		{"interface", "KEYWORD"},
		{"is", "KEYWORD"},
		{"let", "KEYWORD"},
		{"lib", "KEYWORD"},
		{"like", "KEYWORD"},
		{"long", "KEYWORD"},
		{"loop", "KEYWORD"},
		{"me", "KEYWORD"},
		{"mod", "KEYWORD"},
		{"module", "KEYWORD"},
		{"mustinherit", "KEYWORD"},
		{"mustoverride", "KEYWORD"},
		{"mybase", "KEYWORD"},
		{"myclass", "KEYWORD"},
		{"namespace", "KEYWORD"},
		{"new", "KEYWORD"},
		{"next", "KEYWORD"},
		{"not", "KEYWORD"},
		{"nothing", "KEYWORD"},
		{"notinheritable", "KEYWORD"},
		{"notoverrideable", "KEYWORD"},
		{"object", "KEYWORD"},
		{"on", "KEYWORD"},
		{"option", "KEYWORD"},
		{"optional", "KEYWORD"},
		{"or", "KEYWORD"},
		{"orelse", "KEYWORD"},
		{"overloads", "KEYWORD"},
		{"overrideable", "KEYWORD"},
		{"overrides", "KEYWORD"},
		{"paramarray", "KEYWORD"},
		{"preserve", "KEYWORD"},
		{"private", "KEYWORD"},
		{"property", "KEYWORD"},
		{"protected", "KEYWORD"},
		{"public", "KEYWORD"},
		{"raiseevent", "KEYWORD"},
		{"readonly", "KEYWORD"},
		{"redim", "KEYWORD"},
		{"rem", "KEYWORD"},
		{"removehandler", "KEYWORD"},
		{"resume", "KEYWORD"},
		{"return", "KEYWORD"},
		{"select", "KEYWORD"},
		{"set", "KEYWORD"},
		{"shadows", "KEYWORD"},
		{"shared", "KEYWORD"},
		{"short", "KEYWORD"},
		{"single", "KEYWORD"},
		{"static", "KEYWORD"},
		{"step", "KEYWORD"},
		{"stop", "KEYWORD"},
		{"string", "KEYWORD"},
		{"structure", "KEYWORD"},
		{"sub", "KEYWORD"},
		{"synclock", "KEYWORD"},
		{"then", "KEYWORD"},
		{"throw", "KEYWORD"},
		{"to", "KEYWORD"},
		{"true", "KEYWORD"},
		{"try", "KEYWORD"},
		{"typeof", "KEYWORD"},
		{"unicode", "KEYWORD"},
		{"until", "KEYWORD"},
		{"variant", "KEYWORD"},
		{"when", "KEYWORD"},
		{"while", "KEYWORD"},
		{"with", "KEYWORD"},
		{"withevents", "KEYWORD"},
		{"writeonly", "KEYWORD"},
		{"xor", "KEYWORD"},
		{"#const", "KEYWORD"},
		{"#externalsource", "KEYWORD"},
		{"#if", "KEYWORD"},
		{"#then", "KEYWORD"},
		{"#else", "KEYWORD"},
		{"#region", "KEYWORD"},
        {"(?<!\\\\)\"", "STRING"},
        {"'", "COMMENT"},
        {"/'*", "COMMENT", "'*/"}};
		static String[][] csharp =
		{{"abstract", "KEYWORD"},
		{"as", "KEYWORD"},
		{"base", "KEYWORD"},
		{"bool", "KEYWORD"},
		{"break", "KEYWORD"},
		{"byte", "KEYWORD"},
		{"case", "KEYWORD"},
		{"catch", "KEYWORD"},
		{"char", "KEYWORD"},
		{"checked", "KEYWORD"},
		{"class", "KEYWORD"},
		{"const", "KEYWORD"},
		{"continue", "KEYWORD"},
		{"decimal", "KEYWORD"},
		{"default", "KEYWORD"},
		{"delegate", "KEYWORD"},
		{"do", "KEYWORD"},
		{"double", "KEYWORD"},
		{"else", "KEYWORD"},
		{"enum", "KEYWORD"},
		{"event", "KEYWORD"},
		{"explicit", "KEYWORD"},
		{"extern", "KEYWORD"},
		{"false", "KEYWORD"},
		{"finally", "KEYWORD"},
		{"fixed", "KEYWORD"},
		{"float", "KEYWORD"},
		{"for", "KEYWORD"},
		{"foreach", "KEYWORD"},
		{"goto", "KEYWORD"},
		{"if", "KEYWORD"},
		{"implicit", "KEYWORD"},
		{"in", "KEYWORD"},
		{"int", "KEYWORD"},
		{"interface", "KEYWORD"},
		{"internal", "KEYWORD"},
		{"is", "KEYWORD"},
		{"lock", "KEYWORD"},
		{"long", "KEYWORD"},
		{"namespace", "KEYWORD"},
		{"new", "KEYWORD"},
		{"null", "KEYWORD"},
		{"object", "KEYWORD"},
		{"operator", "KEYWORD"},
		{"out", "KEYWORD"},
		{"override", "KEYWORD"},
		{"params", "KEYWORD"},
		{"private", "KEYWORD"},
		{"protected", "KEYWORD"},
		{"public", "KEYWORD"},
		{"readonly", "KEYWORD"},
		{"ref", "KEYWORD"},
		{"return", "KEYWORD"},
		{"sbyte", "KEYWORD"},
		{"sealed", "KEYWORD"},
		{"short", "KEYWORD"},
		{"sizeof", "KEYWORD"},
		{"stackalloc", "KEYWORD"},
		{"static", "KEYWORD"},
		{"string", "KEYWORD"},
		{"struct", "KEYWORD"},
		{"switch", "KEYWORD"},
		{"this", "KEYWORD"},
		{"throw", "KEYWORD"},
		{"true", "KEYWORD"},
		{"try", "KEYWORD"},
		{"typeof", "KEYWORD"},
		{"uint", "KEYWORD"},
		{"ulong", "KEYWORD"},
		{"unchecked", "KEYWORD"},
		{"unsafe", "KEYWORD"},
		{"ushort", "KEYWORD"},
		{"using", "KEYWORD"},
		{"virtual", "KEYWORD"},
		{"volatile", "KEYWORD"},
		{"void", "KEYWORD"},
		{"while", "KEYWORD"},
        {"(?<!\\\\)\"", "STRING"},
        {"/\\*", "COMMENT", "\\*/"}};
		static String[][] lolcode =
		{{"btw", "KEYWORD"},
		{"byes", "KEYWORD"},
		{"can has", "KEYWORD"},
		{"diaf", "KEYWORD"},
		{"gimmeh", "KEYWORD"},
		{"gtfo", "KEYWORD"},
		{"hai", "KEYWORD"},
		{"i has a", "KEYWORD"},
		{"im in yr", "KEYWORD"},
		{"im otta yr", "KEYWORD"},
		{"in meh", "KEYWORD"},
		{"iz", "KEYWORD"},
		{"kthx", "KEYWORD"},
		{"kthxbye", "KEYWORD"},
		{"lol r", "KEYWORD"},
		{"operators", "KEYWORD"},
		{"visible", "KEYWORD"},
		{"(?<!\\\\)\"", "STRING"}};
        static String[][] javascript =
        {{"abstract", "KEYWORD"},
        {"break", "KEYWORD"},
        {"boolean", "KEYWORD"},
        {"byte", "KEYWORD"},
        {"case", "KEYWORD"},
        {"catch", "KEYWORD"},
        {"char[\\s()]", "KEYWORD"},
        {"class", "KEYWORD"},
        {"const[\\s()]", "KEYWORD"},
        {"continue", "KEYWORD"},
        {"debugger", "KEYWORD"},
        {"default", "KEYWORD"},
        {"delete", "KEYWORD"},
        {"do[\\s{]", "KEYWORD"},
        {"double", "KEYWORD"},
        {"else", "KEYWORD"},
        {"enum", "KEYWORD"},
        {"export", "KEYWORD"},
        {"extends", "KEYWORD"},
        {"final", "KEYWORD"},
        {"finally", "KEYWORD"},
        {"float ", "KEYWORD"},
        {"for[\\s(]", "KEYWORD"},
        {"function", "KEYWORD"},
        {"\\bgoto\\b", "KEYWORD"},
        {"implements", "KEYWORD"},
        {"\\bimport\\b", "KEYWORD"},
        {"int[\\s()]", "KEYWORD"},
        {"interface", "KEYWORD"},
        {"long", "KEYWORD"},
        {"\\bif[\\s()]", "KEYWORD"},
        {"\\sin\\s", "KEYWORD"},
        {"instanceof", "KEYWORD"},
        {"native", "KEYWORD"},
        {"[^\\w]new\\s", "KEYWORD"},
        {"package", "KEYWORD"},
        {"private", "KEYWORD"},
        {"protected", "KEYWORD"},
        {"public", "KEYWORD"},
        {"return", "KEYWORD"},
        {"short", "KEYWORD"},
        {"static", "KEYWORD"},
        {"super", "KEYWORD"},
        {"switch", "KEYWORD"},
        {"synchronized", "KEYWORD"},
        {"this", "KEYWORD"},
        {"throw", "KEYWORD"},
        {"throws", "KEYWORD"},
        {"transient", "KEYWORD"},
        {"try", "KEYWORD"},
        {"typeof", "KEYWORD"},
        {"var[\\s()]", "KEYWORD"},
        {"void", "KEYWORD"},
        {"volatile", "KEYWORD"},
        {"while", "KEYWORD"},
        {"with", "KEYWORD"},
        {"(?<!\\\\)\'", "STRING"},
        {"(?<!\\\\)\"", "STRING"},
        {"//", "COMMENT"},
        {"/\\*", "COMMENT", "\\*/"}};
        enum SyntaxType
        {
                START,
                END,
                KEYWORD,
                VARIABLE,
                METHOD,
                STRING,
                COMMENT,
                ELEMENT,
                TAG,
                ATTR,
                ATTRVALUE
        }
}
